Optimal. Leaf size=38 \[ \frac{a \tan (c+d x)}{d}-a x+\frac{b \cos (c+d x)}{d}+\frac{b \sec (c+d x)}{d} \]
[Out]
________________________________________________________________________________________
Rubi [A] time = 0.0640617, antiderivative size = 38, normalized size of antiderivative = 1., number of steps used = 7, number of rules used = 5, integrand size = 19, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.263, Rules used = {2722, 3473, 8, 2590, 14} \[ \frac{a \tan (c+d x)}{d}-a x+\frac{b \cos (c+d x)}{d}+\frac{b \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
Rule 2722
Rule 3473
Rule 8
Rule 2590
Rule 14
Rubi steps
\begin{align*} \int (a+b \sin (c+d x)) \tan ^2(c+d x) \, dx &=\int \left (a \tan ^2(c+d x)+b \sin (c+d x) \tan ^2(c+d x)\right ) \, dx\\ &=a \int \tan ^2(c+d x) \, dx+b \int \sin (c+d x) \tan ^2(c+d x) \, dx\\ &=\frac{a \tan (c+d x)}{d}-a \int 1 \, dx-\frac{b \operatorname{Subst}\left (\int \frac{1-x^2}{x^2} \, dx,x,\cos (c+d x)\right )}{d}\\ &=-a x+\frac{a \tan (c+d x)}{d}-\frac{b \operatorname{Subst}\left (\int \left (-1+\frac{1}{x^2}\right ) \, dx,x,\cos (c+d x)\right )}{d}\\ &=-a x+\frac{b \cos (c+d x)}{d}+\frac{b \sec (c+d x)}{d}+\frac{a \tan (c+d x)}{d}\\ \end{align*}
Mathematica [A] time = 0.0303475, size = 47, normalized size = 1.24 \[ -\frac{a \tan ^{-1}(\tan (c+d x))}{d}+\frac{a \tan (c+d x)}{d}+\frac{b \cos (c+d x)}{d}+\frac{b \sec (c+d x)}{d} \]
Antiderivative was successfully verified.
[In]
[Out]
________________________________________________________________________________________
Maple [A] time = 0.037, size = 59, normalized size = 1.6 \begin{align*}{\frac{1}{d} \left ( a \left ( \tan \left ( dx+c \right ) -dx-c \right ) +b \left ({\frac{ \left ( \sin \left ( dx+c \right ) \right ) ^{4}}{\cos \left ( dx+c \right ) }}+ \left ( 2+ \left ( \sin \left ( dx+c \right ) \right ) ^{2} \right ) \cos \left ( dx+c \right ) \right ) \right ) } \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [A] time = 1.53546, size = 53, normalized size = 1.39 \begin{align*} -\frac{{\left (d x + c - \tan \left (d x + c\right )\right )} a - b{\left (\frac{1}{\cos \left (d x + c\right )} + \cos \left (d x + c\right )\right )}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [A] time = 1.70017, size = 108, normalized size = 2.84 \begin{align*} -\frac{a d x \cos \left (d x + c\right ) - b \cos \left (d x + c\right )^{2} - a \sin \left (d x + c\right ) - b}{d \cos \left (d x + c\right )} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F(-1)] time = 0., size = 0, normalized size = 0. \begin{align*} \text{Timed out} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [A] time = 1.23229, size = 78, normalized size = 2.05 \begin{align*} -\frac{{\left (d x + c\right )} a + \frac{2 \,{\left (a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{3} + a \tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right ) + 2 \, b\right )}}{\tan \left (\frac{1}{2} \, d x + \frac{1}{2} \, c\right )^{4} - 1}}{d} \end{align*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]